﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAL;

namespace logic
{
    public class departmentType
    {
        public static DataSet select(string where, string orderby, int pagesize, int pageindex)
        {
            return DAL.DbHelper.ExecuteDataSetPageSize("*", "vw_DepartmentType_list", where, "dId", orderby, pagesize, pageindex);
        }
        public static void insertAsParent(string department)
        {
            DepartmentType.insertAsParent(department);
        }
        public static void update(int dId, string department,int parentId,int sort)
        {
            DepartmentType.update(dId, department,parentId,sort);
        }
        public static void deleteWithParent(int dId)
        {
            DepartmentType.deleteWithParent(dId);
        }
        public static void insertAsChild(int dId, string department,int sort)
        {
            DepartmentType.insertAsChild(dId, department,sort);
        }
        public static void deleteWithChild(int dId)
        {
            DepartmentType.deleteWithChild(dId);
        }
        public static DataTable getByParent(int parentId)
        {
            return DepartmentType.getByParent(parentId);
        }
        public static DepartmentTypeEntity getById(int dId)
        {
            return DepartmentType.getById(dId);
        }
        public static DataTable listWithParent()
        {
            return DepartmentType.listWithParent();
        }
        public static DataTable ChildrenDtNum(int parentId)
        {
            return DepartmentType.ChildrenDtNum(parentId);
        }
        public static DataTable listWithAll()
        {
            return DepartmentType.listWithAll();
        }
        public static DataTable selectWithComplaintTypeId(int complaintId)
        {
            return DepartmentType.selectWithComplaintTypeId(complaintId);
        }
        public static DepartmentTypeEntity getByChildId(int dId)
        {
            return DepartmentType.getByChildId(dId);
        }
        public static void updateIsShow(int dId)
        {
            DepartmentType.updateIsShow(dId);
        }
    }
}
